﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MC.RideEvent.Mvc.Models.Entity;
using MC.RideEvent.Mvc.Models.ViewModel;

namespace MC.RideEvent.Mvc.Models.Repository
{
    public interface IEventRepository
    {
        /// <summary>
        /// Return a list of event taking
        /// only event activated and which the
        /// date begin higher date of today.
        /// </summary>
        /// <returns></returns>
        List<EventViewModel> GetEvents();

        /// <summary>
        /// Return a list of event taking
        /// the five last.
        /// </summary>
        /// <returns></returns>
        List<EventViewModel> GetLastEvents();

        /// <summary>
        /// Perform un research on events and
        /// return a result as list of event.
        /// </summary>
        /// <param name="text"></param>
        /// <param name="date"></param>
        /// <returns></returns>
        List<EventViewModel> ResearchEvents(string text, DateTime? date);

        /// <summary>
        /// This method return an event
        /// basing on "id" argument or return null if is do not exist.
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        EventViewModel GetEventById(int id);

        /// <summary>
        /// This method check if the current user
        /// has made a way on this event yet.
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="eventId"></param>
        /// <returns></returns>
        bool IfUserWayExist(int userId, int eventId);

        /// <summary>
        /// This method return some suggestion event
        /// about the current user.
        /// </summary>
        /// <returns></returns>
        bool SuggestEvent();
    }
}
